package HomeWorkNewYear;
import java.util.Scanner;

public class Day03 {
    public static void main(String[] args) {
        System.out.println(5/2);
        System.out.println(5%2);
        System.out.println(5*2);

        int a1=5;
        int b1=10;
        a1++;
        b1--;
        System.out.println(a1);
        System.out.println(b1);

        int c1=a1++;
        int d1=b1--;
        System.out.println(a1);
        System.out.println(b1);
        System.out.println(c1);
        System.out.println(d1);

        int a2=10,b2=5,c2=2;
        boolean d2=a2<c2;
        System.out.println(d2);
        System.out.println(a2==b2);
        System.out.println(a2>=b2);
        System.out.println(a2!=b2);

        System.out.println(b2*c2==a2);
        System.out.println(b2%c2==0);
        System.out.println(a2++==a2);
        System.out.println(++b2==b2);

        int a3=5,b3=10,c3=5;
        boolean d3 =a3<=b3 && a3<c3;
        System.out.println(d3);
        System.out.println(a3==b3 && a3==c3);
        System.out.println(a3<=b3 && a3>=c3);
        System.out.println(a3==b3 && b3==c3);
        boolean e3 = a3<=b3 || a3!=c3;
        System.out.println(e3);
        System.out.println(a3==b3 || a3==c3);
        System.out.println(a3<=b3 || a3>=c3);
        System.out.println(a3==b3 || b3==c3);

        int a4 = 4;
        a4+=10;
        System.out.println(a4);
        a4*=2;
        System.out.println(a4);
        a4/=2;
        System.out.println(a4);
        a4%=3;
        System.out.println(a4);

        short b4=5;
        b4+=10;
        System.out.println(b4);

        int age=18;
        System.out.println("age="+18);
        String name = "王满满";
        System.out.println("name="+name);

        int num=5;
        int flag = num>0?1:0;
        System.out.println(flag);

        int a6 = 5;
        int b6 = 10;
        int max=a6>b6?a6:b6;
        System.out.println(max);

        int price = 200;
        if (price>=500){
            price*=0.8;
        }
        System.out.println(price);

        int score = 600;
        if (0<=score && score<=100){
            System.out.println("成绩是合法的");
        }
        System.out.println("继续执行");

        price=300;
        if (price>=500){
            price*=0.8;
        }
        else {
            price*=0.9;
        }
        System.out.println("最终消费金额为:"+price);
        score = 6550;
        if (0<=score && score<=100){
            System.out.println("成绩合法");
        }
        else {
            System.out.println("成绩不合法");
        }

        price=100;
        if (price>=2000){
            price*=0.5;
        }
        else if (price>=1000){
            price*=0.7;
        }
        else if (price>=500){
            price*=0.8;
        }
        else {
            price*=0.9;
        }
        System.out.println("最终消费金额为:"+price);

        Scanner scan = new Scanner(System.in);
        System.out.println("请选择功能:1.存款 2.取款 3.查询余额 4.退卡");
        int command = scan.nextInt();
        switch (command){
            case 1:
                System.out.println("存款业务");
                break;
            case 2:
                System.out.println("取款业务");
                break;
            case 3:
                System.out.println("查询余额业务");
                break;
            case 4:
                System.out.println("退款业务");
                break;
                default:
                    System.out.println("操作错误");
        }

    }
}
